﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x020000F0 RID: 240
	[Serializable]
	public class ColorGradingModel : PostProcessingModel
	{
		// Token: 0x170000CC RID: 204
		// (get) Token: 0x060004D7 RID: 1239 RVA: 0x0002752D File Offset: 0x0002572D
		// (set) Token: 0x060004D8 RID: 1240 RVA: 0x00027535 File Offset: 0x00025735
		public ColorGradingModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
				this.OnValidate();
			}
		}

		// Token: 0x170000CD RID: 205
		// (get) Token: 0x060004D9 RID: 1241 RVA: 0x00027544 File Offset: 0x00025744
		// (set) Token: 0x060004DA RID: 1242 RVA: 0x0002754C File Offset: 0x0002574C
		public bool isDirty { get; internal set; }

		// Token: 0x170000CE RID: 206
		// (get) Token: 0x060004DB RID: 1243 RVA: 0x00027555 File Offset: 0x00025755
		// (set) Token: 0x060004DC RID: 1244 RVA: 0x0002755D File Offset: 0x0002575D
		public RenderTexture bakedLut { get; internal set; }

		// Token: 0x060004DD RID: 1245 RVA: 0x00027566 File Offset: 0x00025766
		public override void Reset()
		{
			this.m_Settings = ColorGradingModel.Settings.defaultSettings;
			this.OnValidate();
		}

		// Token: 0x060004DE RID: 1246 RVA: 0x00027579 File Offset: 0x00025779
		public override void OnValidate()
		{
			this.isDirty = true;
		}

		// Token: 0x040006AC RID: 1708
		[SerializeField]
		private ColorGradingModel.Settings m_Settings = ColorGradingModel.Settings.defaultSettings;

		// Token: 0x020000F1 RID: 241
		public enum Tonemapper
		{
			// Token: 0x040006B0 RID: 1712
			None,
			// Token: 0x040006B1 RID: 1713
			ACES,
			// Token: 0x040006B2 RID: 1714
			Neutral
		}

		// Token: 0x020000F2 RID: 242
		[Serializable]
		public struct TonemappingSettings
		{
			// Token: 0x170000CF RID: 207
			// (get) Token: 0x060004DF RID: 1247 RVA: 0x00027584 File Offset: 0x00025784
			public static ColorGradingModel.TonemappingSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.TonemappingSettings
					{
						tonemapper = ColorGradingModel.Tonemapper.Neutral,
						neutralBlackIn = 0.02f,
						neutralWhiteIn = 10f,
						neutralBlackOut = 0f,
						neutralWhiteOut = 10f,
						neutralWhiteLevel = 5.3f,
						neutralWhiteClip = 10f
					};
				}
			}

			// Token: 0x040006B3 RID: 1715
			[Tooltip("Tonemapping algorithm to use at the end of the color grading process. Use \"Neutral\" if you need a customizable tonemapper or \"Filmic\" to give a standard filmic look to your scenes.")]
			public ColorGradingModel.Tonemapper tonemapper;

			// Token: 0x040006B4 RID: 1716
			[Range(-0.1f, 0.1f)]
			public float neutralBlackIn;

			// Token: 0x040006B5 RID: 1717
			[Range(1f, 20f)]
			public float neutralWhiteIn;

			// Token: 0x040006B6 RID: 1718
			[Range(-0.09f, 0.1f)]
			public float neutralBlackOut;

			// Token: 0x040006B7 RID: 1719
			[Range(1f, 19f)]
			public float neutralWhiteOut;

			// Token: 0x040006B8 RID: 1720
			[Range(0.1f, 20f)]
			public float neutralWhiteLevel;

			// Token: 0x040006B9 RID: 1721
			[Range(1f, 10f)]
			public float neutralWhiteClip;
		}

		// Token: 0x020000F3 RID: 243
		[Serializable]
		public struct BasicSettings
		{
			// Token: 0x170000D0 RID: 208
			// (get) Token: 0x060004E0 RID: 1248 RVA: 0x000275EC File Offset: 0x000257EC
			public static ColorGradingModel.BasicSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.BasicSettings
					{
						postExposure = 0f,
						temperature = 0f,
						tint = 0f,
						hueShift = 0f,
						saturation = 1f,
						contrast = 1f
					};
				}
			}

			// Token: 0x040006BA RID: 1722
			[Tooltip("Adjusts the overall exposure of the scene in EV units. This is applied after HDR effect and right before tonemapping so it won't affect previous effects in the chain.")]
			public float postExposure;

			// Token: 0x040006BB RID: 1723
			[Range(-100f, 100f)]
			[Tooltip("Sets the white balance to a custom color temperature.")]
			public float temperature;

			// Token: 0x040006BC RID: 1724
			[Tooltip("Sets the white balance to compensate for a green or magenta tint.")]
			[Range(-100f, 100f)]
			public float tint;

			// Token: 0x040006BD RID: 1725
			[Range(-180f, 180f)]
			[Tooltip("Shift the hue of all colors.")]
			public float hueShift;

			// Token: 0x040006BE RID: 1726
			[Range(0f, 2f)]
			[Tooltip("Pushes the intensity of all colors.")]
			public float saturation;

			// Token: 0x040006BF RID: 1727
			[Range(0f, 2f)]
			[Tooltip("Expands or shrinks the overall range of tonal values.")]
			public float contrast;
		}

		// Token: 0x020000F4 RID: 244
		[Serializable]
		public struct ChannelMixerSettings
		{
			// Token: 0x170000D1 RID: 209
			// (get) Token: 0x060004E1 RID: 1249 RVA: 0x0002764C File Offset: 0x0002584C
			public static ColorGradingModel.ChannelMixerSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.ChannelMixerSettings
					{
						red = new Vector3(1f, 0f, 0f),
						green = new Vector3(0f, 1f, 0f),
						blue = new Vector3(0f, 0f, 1f),
						currentEditingChannel = 0
					};
				}
			}

			// Token: 0x040006C0 RID: 1728
			public Vector3 red;

			// Token: 0x040006C1 RID: 1729
			public Vector3 green;

			// Token: 0x040006C2 RID: 1730
			public Vector3 blue;

			// Token: 0x040006C3 RID: 1731
			[HideInInspector]
			public int currentEditingChannel;
		}

		// Token: 0x020000F5 RID: 245
		[Serializable]
		public struct LogWheelsSettings
		{
			// Token: 0x170000D2 RID: 210
			// (get) Token: 0x060004E2 RID: 1250 RVA: 0x000276BC File Offset: 0x000258BC
			public static ColorGradingModel.LogWheelsSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.LogWheelsSettings
					{
						slope = Color.clear,
						power = Color.clear,
						offset = Color.clear
					};
				}
			}

			// Token: 0x040006C4 RID: 1732
			[Trackball("GetSlopeValue")]
			public Color slope;

			// Token: 0x040006C5 RID: 1733
			[Trackball("GetPowerValue")]
			public Color power;

			// Token: 0x040006C6 RID: 1734
			[Trackball("GetOffsetValue")]
			public Color offset;
		}

		// Token: 0x020000F6 RID: 246
		[Serializable]
		public struct LinearWheelsSettings
		{
			// Token: 0x170000D3 RID: 211
			// (get) Token: 0x060004E3 RID: 1251 RVA: 0x000276F8 File Offset: 0x000258F8
			public static ColorGradingModel.LinearWheelsSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.LinearWheelsSettings
					{
						lift = Color.clear,
						gamma = Color.clear,
						gain = Color.clear
					};
				}
			}

			// Token: 0x040006C7 RID: 1735
			[Trackball("GetLiftValue")]
			public Color lift;

			// Token: 0x040006C8 RID: 1736
			[Trackball("GetGammaValue")]
			public Color gamma;

			// Token: 0x040006C9 RID: 1737
			[Trackball("GetGainValue")]
			public Color gain;
		}

		// Token: 0x020000F7 RID: 247
		public enum ColorWheelMode
		{
			// Token: 0x040006CB RID: 1739
			Linear,
			// Token: 0x040006CC RID: 1740
			Log
		}

		// Token: 0x020000F8 RID: 248
		[Serializable]
		public struct ColorWheelsSettings
		{
			// Token: 0x170000D4 RID: 212
			// (get) Token: 0x060004E4 RID: 1252 RVA: 0x00027734 File Offset: 0x00025934
			public static ColorGradingModel.ColorWheelsSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.ColorWheelsSettings
					{
						mode = ColorGradingModel.ColorWheelMode.Log,
						log = ColorGradingModel.LogWheelsSettings.defaultSettings,
						linear = ColorGradingModel.LinearWheelsSettings.defaultSettings
					};
				}
			}

			// Token: 0x040006CD RID: 1741
			public ColorGradingModel.ColorWheelMode mode;

			// Token: 0x040006CE RID: 1742
			[TrackballGroup]
			public ColorGradingModel.LogWheelsSettings log;

			// Token: 0x040006CF RID: 1743
			[TrackballGroup]
			public ColorGradingModel.LinearWheelsSettings linear;
		}

		// Token: 0x020000F9 RID: 249
		[Serializable]
		public struct CurvesSettings
		{
			// Token: 0x170000D5 RID: 213
			// (get) Token: 0x060004E5 RID: 1253 RVA: 0x0002776C File Offset: 0x0002596C
			public static ColorGradingModel.CurvesSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.CurvesSettings
					{
						master = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						red = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						green = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						blue = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						hueVShue = new ColorGradingCurve(new AnimationCurve(), 0.5f, true, new Vector2(0f, 1f)),
						hueVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, true, new Vector2(0f, 1f)),
						satVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, false, new Vector2(0f, 1f)),
						lumVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, false, new Vector2(0f, 1f)),
						e_CurrentEditingCurve = 0,
						e_CurveY = true,
						e_CurveR = false,
						e_CurveG = false,
						e_CurveB = false
					};
				}
			}

			// Token: 0x040006D0 RID: 1744
			public ColorGradingCurve master;

			// Token: 0x040006D1 RID: 1745
			public ColorGradingCurve red;

			// Token: 0x040006D2 RID: 1746
			public ColorGradingCurve green;

			// Token: 0x040006D3 RID: 1747
			public ColorGradingCurve blue;

			// Token: 0x040006D4 RID: 1748
			public ColorGradingCurve hueVShue;

			// Token: 0x040006D5 RID: 1749
			public ColorGradingCurve hueVSsat;

			// Token: 0x040006D6 RID: 1750
			public ColorGradingCurve satVSsat;

			// Token: 0x040006D7 RID: 1751
			public ColorGradingCurve lumVSsat;

			// Token: 0x040006D8 RID: 1752
			[HideInInspector]
			public int e_CurrentEditingCurve;

			// Token: 0x040006D9 RID: 1753
			[HideInInspector]
			public bool e_CurveY;

			// Token: 0x040006DA RID: 1754
			[HideInInspector]
			public bool e_CurveR;

			// Token: 0x040006DB RID: 1755
			[HideInInspector]
			public bool e_CurveG;

			// Token: 0x040006DC RID: 1756
			[HideInInspector]
			public bool e_CurveB;
		}

		// Token: 0x020000FA RID: 250
		[Serializable]
		public struct Settings
		{
			// Token: 0x170000D6 RID: 214
			// (get) Token: 0x060004E6 RID: 1254 RVA: 0x00027A1C File Offset: 0x00025C1C
			public static ColorGradingModel.Settings defaultSettings
			{
				get
				{
					return new ColorGradingModel.Settings
					{
						tonemapping = ColorGradingModel.TonemappingSettings.defaultSettings,
						basic = ColorGradingModel.BasicSettings.defaultSettings,
						channelMixer = ColorGradingModel.ChannelMixerSettings.defaultSettings,
						colorWheels = ColorGradingModel.ColorWheelsSettings.defaultSettings,
						curves = ColorGradingModel.CurvesSettings.defaultSettings
					};
				}
			}

			// Token: 0x040006DD RID: 1757
			public ColorGradingModel.TonemappingSettings tonemapping;

			// Token: 0x040006DE RID: 1758
			public ColorGradingModel.BasicSettings basic;

			// Token: 0x040006DF RID: 1759
			public ColorGradingModel.ChannelMixerSettings channelMixer;

			// Token: 0x040006E0 RID: 1760
			public ColorGradingModel.ColorWheelsSettings colorWheels;

			// Token: 0x040006E1 RID: 1761
			public ColorGradingModel.CurvesSettings curves;
		}
	}
}
